package cate.game.role.pvp.teampvp.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTeamPvp;
import cate.game.pvp.teampvp.dto.TeamPvpInviteApplyData;

@ClientMsg(title = "组队竞技邀请申请列表")
public class TeamPvpInviteApplyListReq implements MsgInput {
    @Override
    public void execute(GameBody game, ClientContext cc) {
        TeamPvpInviteApplyData applyData = game.pvp.teamPvp.loadInviteApplyList(cc.getRole());
        cc.sendNow(new TeamPvpInviteApplyListResp(applyData == null ? null : applyData.applyList));
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTeamPvp.APPLY_LIST_REQ;
    }
}
